package com.wildlife.springboot.controller.dto;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/photo")
public class PhotoController {
    @Value("${files.upload.path}")
    private String photoUploadPath;

    @PostMapping
    public String upload(@RequestParam MultipartFile file) {
        String originalFilename = file.getOriginalFilename();

        //先储存到磁盘



        // 判断配置的文件目录是否存在，若不存在则创建一个新的

        return "";
    }
}
